﻿using System;
using Hongsh.Pay.Client.Proxy.Http;

namespace Hongsh.Pay.Client.Proxy.Handlers
{
	// Token: 0x0200005E RID: 94
	public static class LiantuofuProxy
	{
		// Token: 0x06000312 RID: 786 RVA: 0x00003EF0 File Offset: 0x000020F0
		public static void AddLiantuofuProxyHandler(this HttpServer svr)
		{
			svr.RouterList.Add("POST/open/merchant/merchantValidate", new HttpContextActionDelegate(Validate));
			svr.RouterList.Add("POST/open/pay", new HttpContextActionDelegate(Process));
		}

		// Token: 0x06000313 RID: 787 RVA: 0x0000E69C File Offset: 0x0000C89C
		private static void Validate(HttpContext ctx)
		{
			ctx.Result = new HttpJsonResult(new
			{
				validate = 1,
				code = "SUCCESS",
				msg = "查询成功",
				random = "20210505220415",
				sign = Guid.NewGuid().ToString("N")
			});
		}

		// Token: 0x06000314 RID: 788 RVA: 0x00003F2A File Offset: 0x0000212A
		private static void Process(HttpContext ctx)
		{
			ctx.Result = new HttpJsonResult(new
			{
				code = "FAILED",
				msg = "HONGSH测试结果：支付失败！",
				subCode = "PARAMETER_ERROR",
				subMsg = "HONGSH测试结果：支付失败！"
			});
		}
	}
}
